package com.dyh.hissystem.dto;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;
import java.time.LocalDate;

import java.time.LocalDateTime;


/**
 * @author Administrator
 */
@Data
@Builder
@TableName("user")
@Schema(name = "User", title = "用户实体类")
public class User {
    @TableId(value = "user_id", type = IdType.AUTO)
    private long userId;
    @TableField(value = "user_name")
    private String userName;
    @TableField(value = "name")
    private String name;
    @TableField(value = "sex")
    private int sex;
    @TableField(value = "password")
    private String password;
    @TableField(value = "description")
    private String description;
    @TableField(value = "is_locked")
    private String isLocked;
    @TableField(value = "is_actived")
    private String isActived;
    @TableField(value = "password_updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate passwordUpdatedTime;
    @TableField(value = "regist_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime registTime;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getIsLocked() {
        return isLocked;
    }

    public void setIsLocked(String isLocked) {
        this.isLocked = isLocked;
    }

    public String getIsActived() {
        return isActived;
    }

    public void setIsActived(String isActived) {
        this.isActived = isActived;
    }

    public LocalDate getPasswordUpdatedTime() {
        return passwordUpdatedTime;
    }

    public void setPasswordUpdatedTime(LocalDate passwordUpdatedTime) {
        this.passwordUpdatedTime = passwordUpdatedTime;
    }

    public LocalDateTime getRegistTime() {
        return registTime;
    }

    public void setRegistTime(LocalDateTime registTime) {
        this.registTime = registTime;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", name='" + name + '\'' +
                ", sex=" + sex +
                ", password='" + password + '\'' +
                ", description='" + description + '\'' +
                ", isLocked='" + isLocked + '\'' +
                ", isActived='" + isActived + '\'' +
                ", passwordUpdatedTime='" + passwordUpdatedTime + '\'' +
                ", registTime='" + registTime + '\'' +
                '}';
    }

    public User(long userId, String userName, String name, int sex, String password, String description, String isLocked, String isActived, LocalDate passwordUpdatedTime, LocalDateTime registTime) {
        this.userId = userId;
        this.userName = userName;
        this.name = name;
        this.sex = sex;
        this.password = password;
        this.description = description;
        this.isLocked = isLocked;
        this.isActived = isActived;
        this.passwordUpdatedTime = passwordUpdatedTime;
        this.registTime = registTime;
    }

    public User(String userName, String name, int sex, String password, String description, String isLocked, String isActived, LocalDate passwordUpdatedTime, LocalDateTime registTime) {
        this.userName = userName;
        this.name = name;
        this.sex = sex;
        this.password = password;
        this.description = description;
        this.isLocked = isLocked;
        this.isActived = isActived;
        this.passwordUpdatedTime = passwordUpdatedTime;
        this.registTime = registTime;
    }

    public User() {
    }


}
